home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
libs
/
unixlib.lha
/
unix
/
src
/
mkdir.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-01-04
|
398b
|
22 lines
#include "amiga.h"
#include <stdarg.h>
int mkdir(char *name, mode_t mode)
{
BPTR lock;
long amode;
__chkabort();
if (lock = CreateDir(name)) {
UnLock(lock);
/* We remove script because mode 777 contains it by def, but it is
meaningless for directories */
amode = _make_protection(mode) & ~(FIBF_SCRIPT);
if (SetProtection(name, amode))
return 0;
}
ERROR;
}